﻿using Resn.WhuPub.BLL;
using Resn.WhuPub.DML;
using System;

namespace Resn.WhuPub.BLL
{
        /// <summary>
        /// 实现发票寄送流程流程的属性和方法
        /// </summary>
        public class InvoiceFlow :Entity<InvoiceFlowModel>
        {
                #region 构造函数

                /// <summary>
                /// 创建发票寄送流程实例
                /// </summary>
                /// <param name="model">发票寄送流程模型</param>
                public InvoiceFlow(InvoiceFlowModel model)
                        : base(model)
                {
                }

                #endregion


                #region 属性

                #region 基本属性

                /// <summary>
                /// 获取或设置流程状态
                /// </summary>
                /// <value>
                /// 流程状态
                /// </value>
                public InvoiceState State
                {
                        get
                        {
                                return (InvoiceState)Enum.Parse(typeof(InvoiceState), Model.State);
                        }
                        set
                        {
                                Model.State = value.ToString();
                        }
                }

                /// <summary>
                /// 获取寄送员工标识
                /// </summary>
                /// <value>
                /// 寄送员工标识
                /// </value>
                public string DeliveryEmployeeId
                {
                        get
                        {
                                return Model.DeliveryEmployeeId;
                        }
                }

                /// <summary>
                /// 获取或设置寄送时间
                /// </summary>
                /// <value>
                /// 寄送时间
                /// </value>
                public DateTime DeliveryTime
                {
                        get
                        {
                                return Model.DeliveryTime;
                        }
                        set
                        {
                                Model.DeliveryTime = value;
                        }
                }

                /// <summary>
                /// 获取或设置寄送单号
                /// </summary>
                /// <value>
                /// 寄送单号
                /// </value>
                public string DeliveryNumber
                {
                        get
                        {
                                return Model.DeliveryNumber;
                        }
                        set
                        {
                                Model.DeliveryNumber = value;
                        }
                }

                /// <summary>
                /// 获取经销商标识
                /// </summary>
                /// <value>
                /// 经销商标识
                /// </value>
                public string DealerId
                {
                        get
                        {
                                return Model.DealerId;
                        }
                        set
                        {
                                Model.DealerId = value;
                        }
                }

                /// <summary>
                /// 获取开票员工标识
                /// </summary>
                /// <value>
                /// 开票员工标识
                /// </value>
                public string BillingEmployeeId
                {
                        get
                        {
                                return Model.BillingEmployeeId;
                        }
                        set
                        {
                                Model.BillingEmployeeId = value;
                        }
                }

                /// <summary>
                /// 获取或设置发票编号
                /// </summary>
                /// <value>
                /// 发票编号
                /// </value>
                public string BillingNumber
                {
                        get
                        {
                                return Model.BillingNumber;
                        }
                        set
                        {
                                Model.BillingNumber = value;
                        }
                }

               

                /// <summary>
                /// 获取或设置开票时间
                /// </summary>
                /// <value>
                /// 开票时间
                /// </value>
                public string BillingTime
                {
                        get
                        {
                                return Model.BillingTime;
                        }
                        set
                        {
                                Model.BillingTime = value;
                        }
                }

                /// <summary>
                /// 获取或设置开票金额
                /// </summary>
                /// <value>
                /// 开票金额
                /// </value>
                public Double BillingAmount
                {
                        get
                        {
                                return Model.BillingAmount;
                        }
                        set
                        {
                                Model.BillingAmount = value;
                        }
                }

                /// <summary>
                /// 获取或设置开票员工是否已确认
                /// </summary>
                /// <value>
                /// 开票员工是否已确认
                /// </value>
                public bool IsBillingConfirmed
                {
                        get
                        {
                                return Model.IsBillingConfirmed;
                        }
                        set
                        {
                                Model.IsBillingConfirmed = value;
                        }
                }

                

                #endregion 基本属性

                

                #endregion 属性

                #region 方法

                /// <summary>
                /// 获取指定标识的对象
                /// </summary>
                /// <param name="id">标识</param>
                /// <returns></returns>
                public static InvoiceFlow Select(string id)
                {
                        return Select<InvoiceFlow>(id);
                }

                #endregion

        }
}